/**
 * 
 */
package com.roshan.web.security.service;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.roshan.web.security.domain.RoarAuthenticationToken;
import com.roshan.web.security.domain.RoarMFAAuthenticationToken;

public interface ICookieService {

    Object retrieveCookiePersistedObject(String key, HttpServletRequest request);

    String retrieveDecryptedCookieValue(String key, HttpServletRequest request);

    void removeCookie(String cookieName, HttpServletRequest request, HttpServletResponse response);

    Cookie getCookie(String cookieName, HttpServletRequest request);

    Cookie retrieveCookie(String key, HttpServletRequest request);

    boolean isValidMFACookieContent(String cookieContent, String userName, String customerUri);

    void createMFASecurityContext(String username, String customerUri, HttpServletRequest request,
            HttpServletResponse response);

    void createRoarSecurityContext(RoarAuthenticationToken token, HttpServletRequest request,
            HttpServletResponse response);

    void createRoarMFASecurityContext(RoarMFAAuthenticationToken mfaToken, HttpServletRequest request,
            HttpServletResponse response);

    void createRoarSecurityTimeOutContext(HttpServletRequest request, HttpServletResponse response);

}
